﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="WF.Web.Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>上海中原流程审批系统</title>
    <link href="css/main.css" rel="stylesheet" type="text/css" />   
    <script type="text/javascript" language="javascript">
        function OnBodyload() {
            path = this.window.location.pathname;
            if (this.window.parent == this.window) {
                setdefaultfocus();
            }
            else {
                SetRootWindowLocation(this.window.parent, path);
            }
        }

        function SetRootWindowLocation(win, path) {
            if (win.parent == win) {
                win.parent.location = path;
            }
            else {
                SetRootWindowLocation(win.parent, path);
            }
        }

        function setdefaultfocus() {
            var un = document.getElementById('UserName');
            if (un) {
                un.focus();
                un.select();
            }
        }
        //        function OnLoginClick() {
        //            if (document.getElementById("password").value == "") {
        //                document.getElementById("wrong_info").style.visibility = "visible";
        //                //$("#password").focus();
        //                document.getElementById("password").focus();
        //                return false;
        //            }
        //            else {
        //                window.location.href = "default.aspx";
        //                return false;
        //            }
        //        }
    </script>
</head>
<body id="login" onload="OnBodyload();">
    <form id="form1" runat="server">
   <asp:MultiView ID="MultiLoginView" runat="server" ActiveViewIndex="0">
        <asp:View ID="LoginView" runat="server">
            <div class="content">
                <table>
                    <tr align="right"><th colspan="2"><font size="4">&nbsp;&nbsp;&nbsp;&nbsp;<%=this.SystemName%>系统登录</font></th></tr>
                    <tr>
                        <th>
                            用户名：
                        </th>
                        <td>
                            <span class="username">
                                <asp:TextBox name="UserName" type="text" ID="UserName" Text="" onfocus="this.select();" 
                                    runat="server" />
                                <%-- <input name="UserName" type="text" class="login_txt" id="UserName" value="Centaline00001" />--%>
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            密&nbsp;&nbsp;&nbsp;&nbsp;码：
                        </th>
                        <td>
                            <asp:TextBox name="password" TextMode="Password" ID="password"
                                runat="server" Text="123456" />
                            <%--<input name="password" type="password" class="login_txt" id="password" />--%>
                        </td>
                    </tr>
                    <tr>
                        <th>
                        </th>
                        <td>
                            <asp:Button ID="btn_login" name="login" type="button" Text="登录" runat="server" OnClick="btn_login_Click" />
                            <%--<input id="btn_login" onclick="login()" name="login" type="button"  value="登录" />--%>
                            <asp:Button ID="btn_login1" name="login1" type="button" Text="模拟登录" runat="server" OnClick="btn_login1_Click" Visible="false"/>
                        </td>
                    </tr>
                    <tfoot>
                        <tr>
                            <th>
                            </th>
                            <td>
                                版本号：<font color="#cd0513">V1.0.0.1<asp:label id="lblVer" Runat="server"></asp:label></font>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <div id="wrong_info" class="wrongInfo">
                                    <asp:RequiredFieldValidator ID="rfvUserName" runat="server" ErrorMessage="请输入用户名"
                                        ControlToValidate="UserName" EnableClientScript="true" Display="None" SetFocusOnError="true"></asp:RequiredFieldValidator>
                                    <asp:RequiredFieldValidator ID="rfvPassword" runat="server" ErrorMessage="请输入密码 "
                                        ControlToValidate="password" EnableClientScript="true" Display="None" SetFocusOnError="true"></asp:RequiredFieldValidator>
                                    <asp:ValidationSummary ID="ValidationSummary1" EnableClientScript="true" DisplayMode="List"
                                        runat="server" ShowSummary="false" ShowMessageBox="true" />
                                    <div id="MessageBar" class="messagebar" runat="server" visible="false">
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </tfoot>
                </table>
            </div>
        </asp:View>
        <asp:View ID="RoleSelectView" runat="server" 
            onactivate="RoleSelectView_Activate">
            <div class="content">
                <table>
                    <tr>
                        <th colspan="2">
                            请选择您登陆系统的角色
                        </th>
                    </tr>
                    <tr>
                        <td>
                            <asp:DropDownList ID="ddlRoleList" runat="server"  >
                            
                                <asp:ListItem>技术部系统管理员</asp:ListItem>
                                <asp:ListItem>技术部系统管理员</asp:ListItem>
                                <asp:ListItem>技术部系统管理员</asp:ListItem>
                                <asp:ListItem>技术部系统管理员</asp:ListItem>
                                <asp:ListItem>技术部系统管理员</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td>
                            <asp:Button ID="btnSelectRole" name="btnSelectRole" type="button" Text="选择" 
                                runat="server" onclick="btnSelectRole_Click" />
                        </td>
                    </tr>
                </table>
            </div>
        </asp:View>
    </asp:MultiView>
    </form>
</body>
</html>
